<template>
	<div class="category">
		<h3>{{title}}分类</h3>
		<img v-show="title === '美食' " :src="listData" alt="">
		<video v-show="title === '电影' " controls :src="listData" alt=""/>
		<ul v-show="title === '游戏' ">
			<li v-for="(item,index) in listData" :key="index">
				{{item}}
			</li>
		</ul>
	</div>
</template>

<script>
	export default {
		name:'Category',
		props:['title','listData']
	}
</script>

<style scoped>
	.category{
		width: 200px;
		height: 300px;
		background-color: skyblue;
	}
	h3{
		text-align: center;
		background-color: orange;
	}
	img,video{
		width: 100%;
	}
</style>